package com.shxc.smarttrade.old.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.shxc.smarttrade.R;
import com.shxc.smarttrade.old.adapter.RedPackAdapter;
import com.shxc.smarttrade.old.myview.RecycleViewTwoDivider;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by jcdev1 on 2017/8/12.
 */

public class RedPackRecordActivity extends BaseActivity {
    @BindView(R.id.tv_center)
    TextView tvCenter;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.recycler_view)
    RecyclerView recyclerView;
    LinearLayoutManager manager;
    RedPackAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_red_pack_record);
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        tvCenter.setText("红包记录");
        manager = new LinearLayoutManager(this);
        recyclerView.setLayoutManager(manager);
        recyclerView.addItemDecoration(new RecycleViewTwoDivider(this, LinearLayout.VERTICAL, 20, getResources().getColor(R.color.all_background)));
        recyclerView.setAdapter(adapter = new RedPackAdapter(this));
    }

    @OnClick(R.id.rl_left)
    public void onViewClicked() {
        finish();
    }
}
